<?php
/* $Id: panel_orderlist.php 51 2011-02-21 12:27:05Z jim2212001@gmail.com $ */
if(!defined('WEBHOME'))
	die ('DO NOT EXECUTE THIS FILE');
if(!isLogin())
	doLogin();
	
$avalibleAction=array('');
$tpl->assign('loadjs',array('page/panel/orderlist'));
if(isset($_GET['action']) && in_array($_GET['action'],$avalibleAction)){
	$page=$page.'_'.$_GET['action'];
}
$sql = 'SELECT * FROM `orderlist`';
if(!hasPerm(PERM_ADMIN)){
	$sql .= ' WHERE `founderId` = \''.$_SESSION['id'].'\'';
}
$sql .= ' ORDER BY `id` DESC';
$res = $db->query($sql,1);
while($row = $res->fetch_assoc()){
	$list[]=$row;
}
$tpl->assign('list',$list);
?>
